<ion-view class="bg">
  <ion-header-bar class="bar bar-positive">
    <button class="button back-button buttons icon ion-ios-arrow-left button-clear" nav-direction="back" ui-sref="tab.workbench">返回</button>
    <h3 class="title">网点</h3>
  </ion-header-bar>
  <ion-content>
    <ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
    <div ng-if="showloading" class="ion-spinner">
      <ion-spinner icon="lines" class="spinner-calm"></ion-spinner>
    </div>
    <ion-list class="myList" ng-if="showloading==false">
      <h5 ng-if="companyData==undefined" class="notFound">未找到数据</h5>
      <li class="item li" ng-repeat="data in companyData">
        <div>
          <i>{{data.COMPANY_NAME}}</i>
        </div>
        <div>
          <i class="ion-android-pin" style="font-size: 17px;color: #999;"></i>
          <i class="value">{{data.DEPT_ADDRESS}}</i>
        </div>
        <div>
          <i class="ion-android-call" style="font-size: 14px;color: #999;"></i>
          <a class="value" ng-click="callPhone(data.DEPT_PHONE)" style="text-decoration: underline;">{{data.DEPT_PHONE}}</a>
        </div>
        <div class="btnDiv" ng-click="immediatelyOrder(data.ID_,data.COMPANY_NAME)">
          <button class="button button-positive longButton">立即下单</button>
        </div>
      </li>
    </ion-list>
  </ion-content>
</ion-view>
